#!/bin/bash -

function process_file
{
  cat "$1"
}

if [ "$#" -ge 1 ]; then
  for f in "$@"; do
    process_file "$f"
  done
else
  while read line; do
    process_file "$line"
  done
fi
